#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_mpcheck.sqf"
#include "x_setup.sqf"

if (isMultiplayer) then {
	if ((call FUNC(PlayersNumber)) == 0) then {
		__TRACE("Disabling the simulation")
		if (!GVAR(all_simulation_stoped)) then {
			GVAR(all_simulation_stoped) = true;
			{_x enableSimulation false} forEach allUnits;
		};
		waitUntil {sleep (1.012 + random 1);(call FUNC(PlayersNumber)) > 0};
		__TRACE("Enabling the simulation")
		if (GVAR(all_simulation_stoped)) then {
			GVAR(all_simulation_stoped) = false;
			{_x enableSimulation true} forEach allUnits;
		};
	};
};

